export default {
    inserted: (el, binding) => {
        // console.log(el, binding);
        let authname = binding.value.name
        let auths = JSON.parse(sessionStorage.getItem('auths'))
        let allAuths = auths.map(item => item.name)
        auths.forEach(item => {
            allAuths.push(...item.children.map(v => v.name))
        })
        if (!allAuths.includes(authname)) {
            el.remove()
            return
        }
    }
}